package com.jiyun.controller;


import com.jiyun.common.R.R;
import com.jiyun.entity.Feedback;
import com.jiyun.service.impl.FeedbackServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-02-18
 */
@RestController
@RequestMapping("/admin/feedback")
public class FeedbackController {

    @Autowired
    private FeedbackServiceImpl feedbackService;

    //反馈信息
    @PostMapping("/chang")
    public R chang(@RequestBody Feedback feedback){
        feedback.setTime(LocalDate.now());
        feedback.setStatus("处理中");
        feedbackService.save(feedback);
        return R.ok().message("反馈成功");
    }

}
